<?php
/**
 * 首页公司风采类别block文件
 *
 * @author		Arthur(ArthurXF@gmail.com)
 * @copyright	(c) 2006 by bizeway.com
 * @version		$Id$
 * @package		ArthurXF
 * @subpackage	grace
 */
if (is_object($objWebInit)) {
	if(!isset($objgrace)){
		include_once(__WEB_ROOT."/grace/class/grace.class.php");
		include_once(__WEB_ROOT."/grace/config/var.inc.php");
		$objgrace = new grace();
		$objgrace->setDBG($arrGPdoDB);
		if(is_object($objWebInit->db)) $objgrace->db = $objWebInit->db;
		else $objgrace->db();
	}
	$arrParentType = array();
	$arrParentType = $objgrace->getTypeList("where type_parentid = 0",' order by initial,type_sort desc');
	//$arrParentType = $objWebInit->formatTypeList(0,$arrParentType,false);
	foreach ($arrParentType as $k=>$v){
		if(empty($arrMgraceTypeNum[$k])) $strLimit = ' limit 0,14';
		else  $strLimit = ' limit 0,'.$arrMgraceTypeNum[$k];
		$arrParentType[$k]['childtype'] = $objgrace->getTypeList("where type_parentid = '".$v['type_id']."'",' order by initial',$strLimit);
	}

	// 输出到模板
	$arrMOutput["smarty_assign"]['arrParentType'] = $arrParentType;

}
?>